www.gusucode.com > 落叶冰点万能企业网站内容管理系统 V9.1 > 落叶冰点万能企业网站内容管理系统 V9.1\code\Label\custom_Label\下载系统标签库\nd_down_class_tree_z.asp

    <%'$start_ext_newDsoft 以下系统生成,勿删!
'$newDsoft_label_type$:asp_label$end_newDsoft_label_type$
'$newDsoft_label_name$:down_class_tree_z$end_newDsoft_label_name$
'$newDsoft_label_sql$: $end_newDsoft_label_sql$
'$newDsoft_label_params$:url,点分类后转向的页面的文件名,2|lent,分类名最大显示长度,3|sys_content_type,频道栏目id,1|iskkall,展开第二级子分类时,展开全部(如3,4,5级),还是只是第二级分类,为1则展开所有,3$end_newDsoft_label_params$
'$newDsoft_label_fenye_num$: $end_newDsoft_label_fenye_num$
'$newDsoft_label_beizhu$:显示下载分类树,链接的class=menu$end_newDsoft_label_beizhu$
'$newDsoft_is_sys_label$:0$end_newDsoft_is_sys_label$
'$newDsoft_other_params$:htmledxa:1|htmledxb:$end_newDsoft_other_params$
'$end_ext_newDsoft%>
<%
'如果第一级分类有子分类,点第一级分类时是否先不进入其分类链接,而先展开子分类
ishiddenfirstaa="0"
'展开第二级子分类时,展开全部(如3,4,5级),还是只是第二级分类
iskkallaa=cstr($xxvar$iskkall)


biao="[ND_down_class]"

biaosp="[ND_down_Special]"
biao2="[ND_down]"

sys_content_type=$xxvar$sys_content_type


current_root_id=0

back_call_set_in_which_deepth=-123

  function next_cen$$xxxx_d_soft_complie$$rnd$(pid_list,deepth)



  
set rs=server.CreateObject("adodb.recordset")


pppcid="-123"
if pid_list<>"" then
ppplista=split(pid_list,",")
ppplistaubd=ubound(ppplista)-1
pppcid=ppplista(ppplistaubd)
end if  
  
rs.open "select * from "&biao&" where ((deepth="&deepth&" and ((parent_id_list like '%"&pid_list&"%') or (parent_id='"&pppcid&"'))) and sys_content_type='"&sys_content_type&"')  order by clng(orders) asc",newdsoft_conn_obj,1,1

if pid_list<>"" then
lista=split(pid_list,",")
numa=ubound(lista)
p_id=cstr(lista(numa))

else

p_id=0

end if





i_stp=0


do while  not rs.eof

if deepth=0 then current_root_id=rs("id")

if deepth=0 then back_call_set_in_which_deepth=-123




pid_list222=rs("parent_id_list")&","&rs("id")&","
deepth222=rs("deepth")+1


    set rs2=server.CreateObject("adodb.recordset")    
rs2.open "select * from "&biao&" where ((deepth="&deepth222&" and ((parent_id_list like '%"&pid_list222&"%') or (parent_id='"&rs("id")&"'))) and sys_content_type='"&sys_content_type&"')  order by clng(orders) asc",newdsoft_conn_obj,1,1


if deepth=0 then
styleaa="display:inline"
else
styleaa="display:none"
end if

if cstr(rs("id"))=cstr(request("cid")) then
styleaa="display:inline"
back_call_set_in_which_deepth=deepth
end if




idddddd="_"&current_root_id&"_"&deepth&"_"&i_stp



if rs2.eof then


if pid_list<>"" then
lista=split(pid_list,",")
numa=ubound(lista)
p_id=cstr(lista(numa-1))

else

p_id=0

end if
if p_id=0 then p_id=-1




sedesdsz="&id="&sys_content_type
if rs("is_link_class")="1" then

suuurl=rs("outlink")
else

suuurl="$xxvar$url?cid="&rs("id")&sedesdsz

end if

if rs("is_open_use_blank")="1" then

ssss1="_blank"
else
ssss1="_self"
end if




hrfffffffa=suuurl





response.write "<script language=javascript>"&vbcrlf
response.write "var stutas_zi_tree_"&idddddd&"=0;"&vbcrlf
response.write "function cpshow_zi_tree"&idddddd&"(funn,nnnn,digui,url){"&vbcrlf



response.write "if (digui==1){"&vbcrlf


response.write "if(stutas_zi_tree_"&idddddd&"==0){"&vbcrlf



response.write "document.getElementById('"&"cptree"&idddddd&"').style.display='inline';"&vbcrlf


response.write "stutas_zi_tree_"&idddddd&"=1;}"&vbcrlf



response.write "else{"&vbcrlf



response.write "document.getElementById('"&"cptree"&idddddd&"').style.display='none';"&vbcrlf


response.write "stutas_zi_tree_"&idddddd&"=0;"&vbcrlf

response.write "}"&vbcrlf
response.write "}"&vbcrlf



'递归,展开下一层分类
response.write "if (nnnn==1){"&vbcrlf

response.write "var aaaaa;"&vbcrlf

response.write "var aaaaav=0;"&vbcrlf

response.write "var posa;"&vbcrlf

response.write "var posb;"&vbcrlf

response.write "var rootid;"&vbcrlf

response.write "var deepppp;"&vbcrlf

response.write "var nummmmm;"&vbcrlf

response.write "for(var ttt=0;ttt<=funn.length-1;ttt++){"&vbcrlf


response.write "aaaaa=funn.substring(ttt,ttt+1);"&vbcrlf


response.write "if ((aaaaa=='_')&&(aaaaav==0)){aaaaav=aaaaav+1;continue;}"&vbcrlf

response.write "if ((aaaaa=='_')&&(aaaaav==1)){aaaaav=aaaaav+1;posa=ttt;continue;}"&vbcrlf

response.write "if ((aaaaa=='_')&&(aaaaav==2)){aaaaav=aaaaav+1;posb=ttt;}"&vbcrlf


response.write "}"&vbcrlf


response.write "rootid=funn.substring(1,posa);"&vbcrlf

response.write "deepppp=parseInt(funn.substring(posa+1,posb));"&vbcrlf

response.write "nummmmm=parseInt(funn.substring(posb+1,funn.length));"&vbcrlf




response.write "var deepi=deepppp+1;"&vbcrlf

response.write "var nummi=0;"&vbcrlf

response.write "for(nummi=0;nummi<=9999;nummi++){"&vbcrlf

response.write "try{"&vbcrlf


response.write "eval('cpshow_zi_tree_'+rootid+'_'+deepi+'_'+nummi+'(\''+'_'+rootid+'_'+deepi+'_'+nummi+'\',0,1,\'\')');}"&vbcrlf


response.write "catch(e)"&vbcrlf

response.write "{"&vbcrlf

response.write "if(nummi>22){"&vbcrlf

response.write "nummi=9999;break;}"&vbcrlf


response.write "}"&vbcrlf


response.write "}"&vbcrlf



response.write "}"&vbcrlf


response.write "if(url!=''){self.location=url;}"&vbcrlf



response.write "}"&vbcrlf


response.write "</script>"&vbcrlf













response.write "<div id='cptree"&idddddd&"' style='"&styleaa&"'>"
response.write "<a href='"&hrfffffffa&"' target='"&ssss1&"' class=menu>"
%><%for iiiii1=2 to cint(deepth222)
if iiiii1=cint(deepth222) then
response.write "├"
%><%
else
response.write "│"
%><%
end if
next
%><%=left(rs("classname"),$xxvar$lent)%><%


response.write "</a><br>"
response.write "</div>"


if not rs.eof then rs.movenext




'back_call_set_in_which_deepth+1 加1是为了展开当前分类的下一级分类
if back_call_set_in_which_deepth<>-123 and ( deepth<=back_call_set_in_which_deepth+1 or iskkallaa="1") then


response.write "<script language=javascript>"

response.write "document.getElementById('"&"cptree"&idddddd&"').style.display='inline';"


response.write "</script>"

end if




if rs.eof or rs.bof then

 'response.write "</level0>"


'call next_cen_class(pid_list222,deepth222)

exit function

else

need_benji_next=1

end if





else




'response.write "<level0 id="""&rs("id")&"""  parentTypeID="""



'if deepth=0 then response.write "-1" else  response.write p_id


'response.write """ caption="""&rs("ClassName")&"""  PRI=""2"" explain="""&rs("id")&""" >"&vbcrlf

%><%

sedesdsz="&id="&sys_content_type



if deepth=0 then
if ishiddenfirstaa<>"1"  then
hrfffffffa="$xxvar$url?cid="&rs("id")&sedesdsz
hrfffffffab=hrfffffffa
else
hrfffffffa="javascript:"
hrfffffffab=""
end if
else
hrfffffffa="$xxvar$url?cid="&rs("id")&sedesdsz
hrfffffffab=hrfffffffa
end if

if iskkallaa<>"1" then
iskkallaacc="0"
else
iskkallaacc="1"
end if


styleaax=" onclick="&chr(34)&"cpshow_zi_tree"&idddddd&"('"&idddddd&"',1,0,'&"&hrfffffffab&"&')"&chr(34)&" "


response.write "<script language=javascript>"&vbcrlf
response.write "var stutas_zi_tree_"&idddddd&"=0;"&vbcrlf
response.write "function cpshow_zi_tree"&idddddd&"(funn,nnnn,digui,url){"&vbcrlf



response.write "if (digui==1){"&vbcrlf


response.write "if(stutas_zi_tree_"&idddddd&"==0){"&vbcrlf



response.write "document.getElementById('"&"cptree"&idddddd&"').style.display='inline';"&vbcrlf


response.write "stutas_zi_tree_"&idddddd&"=1;}"&vbcrlf



response.write "else{"&vbcrlf



response.write "document.getElementById('"&"cptree"&idddddd&"').style.display='none';"&vbcrlf


response.write "stutas_zi_tree_"&idddddd&"=0;"&vbcrlf

response.write "}"&vbcrlf
response.write "}"&vbcrlf



'递归,展开下一层分类
response.write "if (nnnn==1){"&vbcrlf

response.write "var aaaaa;"&vbcrlf

response.write "var aaaaav=0;"&vbcrlf

response.write "var posa;"&vbcrlf

response.write "var posb;"&vbcrlf

response.write "var rootid;"&vbcrlf

response.write "var deepppp;"&vbcrlf

response.write "var nummmmm;"&vbcrlf

response.write "for(var ttt=0;ttt<=funn.length-1;ttt++){"&vbcrlf


response.write "aaaaa=funn.substring(ttt,ttt+1);"&vbcrlf


response.write "if ((aaaaa=='_')&&(aaaaav==0)){aaaaav=aaaaav+1;continue;}"&vbcrlf

response.write "if ((aaaaa=='_')&&(aaaaav==1)){aaaaav=aaaaav+1;posa=ttt;continue;}"&vbcrlf

response.write "if ((aaaaa=='_')&&(aaaaav==2)){aaaaav=aaaaav+1;posb=ttt;}"&vbcrlf


response.write "}"&vbcrlf


response.write "rootid=funn.substring(1,posa);"&vbcrlf

response.write "deepppp=parseInt(funn.substring(posa+1,posb));"&vbcrlf

response.write "nummmmm=parseInt(funn.substring(posb+1,funn.length));"&vbcrlf




response.write "var deepi=deepppp+1;"&vbcrlf

response.write "var nummi=0;"&vbcrlf

response.write "for(nummi=0;nummi<=9999;nummi++){"&vbcrlf

response.write "try{"&vbcrlf


response.write "eval('cpshow_zi_tree_'+rootid+'_'+deepi+'_'+nummi+'(\''+'_'+rootid+'_'+deepi+'_'+nummi+'\',"&iskkallaacc&",1,\'\')');}"&vbcrlf


response.write "catch(e)"&vbcrlf

response.write "{"&vbcrlf

response.write "if(nummi>22){"&vbcrlf

response.write "nummi=9999;break;}"&vbcrlf


response.write "}"&vbcrlf


response.write "}"&vbcrlf



response.write "}"&vbcrlf


response.write "if(url!=''){self.location=url;}"&vbcrlf



response.write "}"&vbcrlf


response.write "</script>"&vbcrlf




sedesdsz="&id="&request("id")
if rs("is_link_class")="1" then

suuurl=rs("outlink")
else

suuurl=hrfffffffa

end if

if rs("is_open_use_blank")="1" then

ssss1="_blank"
else
ssss1="_self"
end if





'"&styleaax&" 一定不要放在<div id='cptree....里,不然会因为<div的嵌套而导致循环调用onclick
response.write "<div id='cptree"&idddddd&"' style='"&styleaa&"' >"
response.write "<a href='"&suuurl&"' "&styleaax&" target='"&ssss1&"' class=menu>"

%><%for iiiii1=2 to cint(deepth222)
if iiiii1=cint(deepth222) then
response.write "├"
else
response.write "│"
end if
next
%><%=left(rs("classname"),$xxvar$lent)%><%
response.write "</a><br>"

call next_cen$$xxxx_d_soft_complie$$rnd$(pid_list222,deepth222)



response.write "</div>"

'back_call_set_in_which_deepth+1 加1是为了展开当前分类的下一级分类
if back_call_set_in_which_deepth<>-123 and ( deepth<=back_call_set_in_which_deepth+1 or iskkallaa="1") then


response.write "<script language=javascript>"

response.write "document.getElementById('"&"cptree"&idddddd&"').style.display='inline';"


response.write "</script>"


end if





if not rs.eof then rs.movenext

need_benji_next=1

if rs.eof or rs.bof then

'if deepth<>0  then response.write "</level0>"


'call next_cen_class(pid_list222,deepth222)

exit function


end if











end if


if need_benji_next=0 then

exit do

end if

need_benji_next=0
i_stp=i_stp+1

loop



end function




call next_cen$$xxxx_d_soft_complie$$rnd$("",0)


%>